<template>
  <div>
    <a-button>事件委托</a-button>
    <!-- <div v-loading="isLoading">
      测试v-loading
    </div> -->
    <div>
      时间戳自定义格式化指令
      <span v-format-time="'YYYY-MM-DD HH:mm:ss'">1646199232699</span>
    </div>
    <div v-copy>
      复制 
    </div>
  </div>
</template>
<script setup lang="ts">
import {useLoading} from '@/hooks/useLoading'
import {ref} from 'vue'
import dayjs from 'dayjs';

const {isLoading, loadingWrapper} = useLoading()


console.log(dayjs(1646199232699).format('YYYY-MM-DD HH:mm:ss'))

// let str = 'abCD'
// let newStr = changeStr(str)
// console.log(str, newStr)
// // 设置宽度
// const setWith = (el: HTMLElement, width: number | string) => {
//   return el.style.width = typeof width === 'number' ? `${width}px` : width
// } 
// class Person <T> {
//   who: T
//   constructor(who: T){
//     this.who = who
//   }
//   say(code: T){
//     return this.who + ':i am' + code
//   }
// }

// 请求数据的方法
// let DataApi = new Promise((resolve, reject) => {})
// const getTableData = () => {
//   loadingWrapper(DataApi.then (res => {
//     console.log(res)
//   }))
// }


</script>
<style scoped lang="scss">

</style>